<template>
    <div>
        <!-- {{ ary }} -->
        {{ p.name }}
        <button @click="p.name='lily'">修改</button>
    </div>
    <div>
        <!-- <button @click="updateEleByAry">修改成员2</button>
        <button @click="updateAry">修改数组</button> -->
    </div>
</template>
<script lang='ts' setup>

   import {reactive} from 'vue'
   const p=reactive({
    name:'giles',
   })
//    const {name}=p

    // import {ref} from 'vue'
    // let ary=ref<Array<string>>(['Giles','Monica','Jack'])
    // const updateEleByAry=()=>ary.value[1]="Marray"
    // const updateAry=()=>{
    //     ary.value=["Lucy","Lily","Jack"]
    //     console.log('ary',ary);
        
    // }
</script>
<style lang='scss' scoped>
</style>